import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:moose_app/core/utils/navigate_util.dart';
import 'package:moose_app/ui/screens/qrcode/qrcode_screen.dart';
import 'package:moose_app/ui/values/values.dart';
import 'package:moose_app/ui/widgets/common/common_list_item.dart';
import 'package:moose_app/ui/widgets/user/user_avatar.dart';

class ATHProfileScreen extends StatelessWidget {
  static final String routeName = "app://profile";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: false,
        title: Text("个人信息"),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: <Widget>[
            Container(
              child: Column(
                children: <Widget>[
                  ATHCommonListItem(
                    title: Text(
                      "头像",
                      style: TextStyle(color: kColor33, fontSize: kFontSize32),
                    ),
                    trailing: ATHUserAvatar(),
                  ),
                  ATHCommonListItem(
                    title: Text(
                      "名字",
                      style: TextStyle(color: kColor33, fontSize: kFontSize32),
                    ),
                    trailing: Text(
                      "李白",
                      style: TextStyle(color: kColor33, fontSize: kFontSize32),
                    ),
                  ),
                  ATHCommonListItem(
                    title: Text(
                      "我的二维码",
                      style: TextStyle(color: kColor33, fontSize: kFontSize32),
                    ),
                    trailing: SvgPicture.asset(
                      'assets/icons/icon_qrcode.svg',
                      width: kSize48,
                    ),
                    showDivider: false,
                    press: () {
                      ATHNavigator.pushFromRight(
                          context, ATHQrCodeScreen.routeName);
                    },
                  ),
                ],
              ),
            ),
            Container(
              margin: EdgeInsets.only(top: kSize20),
              child: Column(
                children: <Widget>[
                  ATHCommonListItem(
                    title: Text("我的地址",
                        style:
                            TextStyle(color: kColor33, fontSize: kFontSize32)),
                    showDivider: false,
                    press: () {},
                  ),
                ],
              ),
            )
          ],
        ),
      ),
    );
  }
}
